package com.jiayu.wheel.config;

import com.jiayu.wheel.dto.UserDto;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 尝试通过applicationContext获取bean  请参考IocTest.java
 * @author Administrator
 */
@Configuration
public class UserConfig {

    @Bean("user1")
    public UserDto getUser(){
        UserDto userDto = new UserDto();
        userDto.setId(1);
        userDto.setName("名字");
        return userDto;
    }

}
